Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] aiosu v2.0.0 #151

Merged
merged 10 commits into from
Jul 18, 2023
Merged

[feat] aiosu v2.0.0 #151

merged 10 commits into from
Jul 18, 2023

Conversation

NiceAesth
Copy link
Owner

@NiceAesth NiceAesth commented Jul 18, 2023

Changes done:

  • Updated the library to use Pydantic v2
  • Updated models.Mods to be natively serializable, removing a lot of overhead
  • Added Beatmapset.pack_tags
  • Added Beatmapset.current_nominations
  • Added Build.youtube_id
  • Added ChatChannel.message_length_limit
  • Added UserStats.variants for osu! Mania per-key ranking info

Breaking changes:

  • The dict method has been renamed to model_dump
  • The json method has been renamed to model_dump_json
  • The parse_obj method has been renamed to model_validate
  • The parse_raw method has been renamed to model_validate_json
  • The parse_file method has been renamed to model_validate_file
  • Renamed Beatmapset.nomination_summary to Beatmapset.nominations

Should see fairly massive performance improvements on any operations with models.

Self-check

  • The changes are tested with pre-commit
  • The changes pass unit testing with pytest
  • The changes pass mypy

To-do:

References: https://github.com/ppy/osu-web/tree/master/resources/js/interfaces

@NiceAesth NiceAesth linked an issue Jul 18, 2023 that may be closed by this pull request
@NiceAesth NiceAesth merged commit 362bb9c into master Jul 18, 2023
3 checks passed
@NiceAesth NiceAesth deleted the v2 branch July 18, 2023 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pydantic] v2 Breaking changes
1 participant